From c35cb0eb1be9deb87295855b27f88057899d07b1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 9 Dec 2017 23:48:35 -0500 Subject: [PATCH] entry: Allocate the progress bar only what it needs We were allocating the progress bar to the full size of the entry. This made entry icons loose their cursors, since they were 'covered' by the progress bar, even though it doesn't draw anything there. --- gtk/gtkentry.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index fec7dc406f..0ec370208e 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3296,11 +3296,17 @@ gtk_entry_size_allocate (GtkWidget *widget, if (priv->progress_widget && gtk_widget_get_visible (priv->progress_widget)) { GtkAllocation progress_alloc; + int min, nat; + gtk_widget_measure (priv->progress_widget, + GTK_ORIENTATION_VERTICAL, + -1, + &min, &nat, + NULL, NULL); progress_alloc.x = 0; - progress_alloc.y = 0; + progress_alloc.y = allocation->height - nat; progress_alloc.width = allocation->width; - progress_alloc.height = allocation->height; + progress_alloc.height = nat; gtk_widget_size_allocate (priv->progress_widget, &progress_alloc, -1, &child_clip); gdk_rectangle_union (out_clip, &child_clip, out_clip); -- 2.30.2